# import sqlite3
# conn = sqlite3.connect('example.db')
#
# c = conn.cursor()
# # c.execute('''CREATE TABLE DISEASES
# #        (NAME           TEXT,
# #        AGE            TEXT,
# #        ADDRESS        TEXT,
# #        SALARY         TEXT);''')
# for i in range(100):
#     c.execute(f"INSERT INTO DISEASES (NAME,AGE,ADDRESS,SALARY) \
#           VALUES ('Paul', {i}, 'California', 20000.00 )");
#
# cursor = c.execute("SELECT name,age, address, salary  from DISEASES")
# for row in cursor:
#     print(type(row), row)
#
# conn.commit()
# conn.close()
import re
str = 'disease, kind, alias, brief, ' \
      'department, check, method, drug, fee, infect, cure_period, cure_rate, proportion, population, symptom, disease'
str = re.split(', ', str.upper())
for i in str:
    print(i, end=', ')

conn = sqlite3.connect('xywy.db')
    c = conn.cursor()
    # 疾病名称, 疾病类型, 疾病别名, 疾病简介,
    # 挂什么科, 需做检查, 治疗方法, 常用药物, 一般费用, 传染性, 治愈周期, 治愈率, 患病比例, 好发人群, 相关症状, 相关疾病
    # disease, kind, alias, brief,
    # department, check, method, drug, fee, infect, cure_period, cure_rate, proportion, population, symptom, disease
    c.execute('''CREATE TABLE DISEASES
           (DISEASE TEXT,
            KIND TEXT,
            ALIAS TEXT,
            BRIEF TEXT,
            DEPARTMENT TEXT,
            CHECK TEXT,
            METHOD TEXT,
            DRUG TEXT,
            FEE TEXT,
            INFECT TEXT,
            CURE_PERIOD TEXT,
            CURE_RATE TEXT,
            PROPORTION TEXT,
            POPULATION TEXT,
            SYMPTOM TEXT,
            DISEASE TEXT);''')cursor = c.execute("SELECT name,age, address, salary  from DISEASES")

c.execute(f"INSERT INTO DISEASES (DISEASE, KIND, ALIAS, BRIEF, DEPARTMENT, CHECK, METHOD, DRUG, "
          f"FEE, INFECT, CURE_PERIOD, CURE_RATE, PROPORTION, POPULATION, SYMPTOM, DISEASE) \
      VALUES ('Paul', {i}, 'California', 20000.00 )");

conn.commit()
conn.close()
